<?
	// CRON job for refreshing content
	
	
	///usr/local/bin/php /home/deb1083/domains/orangepixel.net/public_html/pascal/puddle/cronjob.php

require_once("config.php");
$blogRoot="../".$blogRoot;
require_once("functions.php");


$silentmode=true;
$configFile = "settings/services.txt";

// read contents
clearstatcache();
$open3 = fopen($configFile, "rb");
	if(filesize($configFile)!="0") $contents = fread($open3, filesize($configFile));
fclose($open3);

// display services
if (strpos($contents,"\r\n")) $entrylist=explode("\r\n",$contents);
else $entrylist=explode("\n",$contents);

foreach ($entrylist as $item) {
	$entry=explode("|",$item);

	$entry[3]=str_replace(CHR(13),'',$entry[3]);
	$entry[3]=str_replace(CHR(10),'',$entry[3]);
	
	if (function_exists($entry[1]."_download")) call_user_func($entry[1]."_download",$entry[0],$entry[3]);
}

archiveTweets();

?>